<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of getPrmDflt</title>
  <meta name="keywords" content="getPrmDflt">
  <meta name="description" content="Helper to set default values (if not already set) of parameter struct.">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<!-- menu.html matlab -->
<h1>getPrmDflt
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>Helper to set default values (if not already set) of parameter struct.</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function varargout = getPrmDflt( prm, dfs, checkExtra ) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Helper to set default values (if not already set) of parameter struct.

 Takes input parameters and a list of 'name'/default pairs, and for each
 'name' for which prm has no value (prm.(name) is not a field or 'name'
 does not appear in prm list), getPrmDflt assigns the given default
 value. If default value for variable 'name' is 'REQ', and value for
 'name' is not given, an error is thrown. See below for usage details.

 USAGE (nargout==1)
  prm = getPrmDflt( prm, dfs, [checkExtra] )

 USAGE (nargout&gt;1)
  [ param1 ... paramN ] = getPrmDflt( prm, dfs, [checkExtra] )

 INPUTS
  prm          - param struct or cell of form {'name1' v1 'name2' v2 ...}
  dfs          - cell of form {'name1' def1 'name2' def2 ...}
  checkExtra   - [0] if 1 throw error if prm contains params not in dfs

 OUTPUTS (nargout==1)
  prm    - parameter struct with fields 'name1' through 'nameN' assigned

 OUTPUTS (nargout&gt;1)
  param1 - value assigned to parameter with 'name1'
   ...
  paramN - value assigned to parameter with 'nameN'

 EXAMPLE
  dfs = { 'x','REQ', 'y',0, 'z',[], 'eps',1e-3 };
  prm = getPrmDflt( struct('x',1,'y',1), dfs )
  [ x y z eps ] = getPrmDflt( {'x',2,'y',1}, dfs )

 See also INPUTPARSER

 Piotr's Image&amp;Video Toolbox      Version 2.42
 Copyright 2010 Piotr Dollar.  [pdollar-at-caltech.edu]
 Please email me if you find bugs, or have suggestions or questions!
 Licensed under the Lesser GPL [see external/lgpl.txt]</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="../classify/fernsClfTrain.html" class="code" title="function [ferns,hsPr] = fernsClfTrain( data, hs, varargin )">fernsClfTrain</a>	Train random fern classifier.</li><li><a href="../classify/fernsRegTrain.html" class="code" title="function [ferns,ysPr] = fernsRegTrain( data, ys, varargin )">fernsRegTrain</a>	Train boosted fern regressor.</li><li><a href="../classify/kmeans2.html" class="code" title="function [ IDX, C, d ] = kmeans2( X, k, varargin )">kmeans2</a>	Fast version of kmeans clustering.</li><li><a href="../images/bbApply.html" class="code" title="function varargout = bbApply( action, varargin )">bbApply</a>	Functions for manipulating bounding boxes (bb).</li><li><a href="../images/bbGt.html" class="code" title="function varargout = bbGt( action, varargin )">bbGt</a>	Bounding box (bb) annotations struct, evaluation and sampling routines.</li><li><a href="../images/bbNms.html" class="code" title="function bbs = bbNms( bbs, varargin )">bbNms</a>	Bounding box (bb) non-maximal suppression (nms).</li><li><a href="../images/imRectRot.html" class="code" title="function [hPatch,api] = imRectRot( varargin )">imRectRot</a>	Create a draggable, resizable, rotatable rectangle or ellipse.</li><li><a href="../images/jitterImage.html" class="code" title="function IJ = jitterImage( I, varargin )">jitterImage</a>	Creates multiple, slightly jittered versions of an image.</li><li><a href="../images/kernelTracker.html" class="code" title="function [allRct, allSim, allIc] = kernelTracker( I, prm )">kernelTracker</a>	Kernel Tracker from Comaniciu, Ramesh and Meer PAMI 2003.</li><li><a href="../images/makeGif.html" class="code" title="function makeGif( M, fileName, prm )">makeGif</a>	Writes a matlab movie to an animated GIF.</li><li><a href="../images/montage2.html" class="code" title="function varargout = montage2( IS, prm )">montage2</a>	Used to display collections of images and videos.</li><li><a href="../images/playMovie.html" class="code" title="function M = playMovie( I, fps, loop, prm )">playMovie</a>	Shows/makes an/several movie(s) from an image sequence.</li><li><a href="../images/seqIo.html" class="code" title="function out = seqIo( fName, action, varargin )">seqIo</a>	Utilities for reading and writing seq files.</li><li><a href="dispMatrixIm.html" class="code" title="function dispMatrixIm( M, varargin )">dispMatrixIm</a>	Display a Matrix with non-negative entries in image form.</li><li><a href="fevalDistr.html" class="code" title="function [out,res] = fevalDistr( funNm, jobs, varargin )">fevalDistr</a>	Run simple jobs locally or in distributed fashion using queue.</li><li><a href="plotRoc.html" class="code" title="function [h,det] = plotRoc( D, varargin )">plotRoc</a>	Function for display of rocs (receiver operator characteristic curves).</li></ul>
<!-- crossreference -->




<!-- Start of Google Analytics Code -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4884268-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<!-- end of Google Analytics Code -->

<hr><address>Generated by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> &copy; 2003</address>
</body>
</html>
